for i in range(1, 10):
    print(i)
print('----------------------')

# 步长为2
for i in range(1, 10, 2):
    print(i)
print('----------------------')

for i in range(1, 10):
    print(i)
    i = 100
    # 同理i = i + 1，无效，赋值
print('----------------------')

# 步长为3
a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
b = a[0 : 8 : 3]
print(b)
print('----------------------')

# 列表可修改性
a[1] = 'abc'
a[2] = 0.9
x = 88
a[3] = x
print(a)
print('----------------------')

# 空列表
a = []
print(a)
print(len(a))

# 列表加法，两端都是列表
d = [1, 2, 3]
d + [4]
print(d)
d = d + [4]
print(d)
d.append(5)
print(d)
